﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using dotUML.Core.Common;
using dotUML.System;

namespace dotUML.Core.Parser
{
    /// <summary>
    /// XmlParserFactory is a factory class, which creates instances 
    /// of XmlParser class and provides them via IXmlParser interface.
    /// </summary>
    public static class XmlParserFactory
    {
        /// <summary>
        /// Creates an instance of an XmlParser.
        /// </summary>
        /// <returns>An instance of an XmlParser via IXmlParser interface.</returns>
        public static IXmlParser GetParser()
        {
            IXmlParser result;
            List<IError> errors = new List<IError>();

            result = (IXmlParser)InstrumentationManager.InstrumentObject(new XmlParser(errors), EInstrumentationType.Logging);

            return result;
        }
    }
}
